<template>
  <div>
    <ul style="display: flex; margin-top: 30px; margin-left: 20px">
      <el-button
        v-for="(item, index) in navList"
        :key="index"
        @click="menuShow(index)"
        class="btn"
        :style="{ color: index == menuIndex ? '#fff' : '#000' }"
        :type="index == menuIndex ? 'warning' : 'text'"
        >{{ item }}</el-button
      >
    </ul>
    <div v-show="menuIndex == 0">
      <div style="position: relative; top: 30px">
        <div class="box1">
          <p style="margin-top: 20px">批量上传</p>
          <p>功能介绍:使用excel快速导入进行商品上传</p>
          <p>如重复导入数据将以最新导入为数据为准，请谨慎使用</p>
          <br />
          <br />
          <p>数据导入订单状态自动修改为已上架</p>
          <br />
          <br />
          <p>
            一次导入的数据不要太多,大量数据请分批导入,建议在服务器负载低的时候进行
          </p>
          <br />
          <br />
          <p>使用方法</p>
          <p>1.下载Excel模板文件并录入信息</p>
          <br />
          <p>2.上传Excel导入</p>
        </div>
        <div style="display: flex; margin-top: 40px; margin-left: 50px">
          <span>Excel</span>
          <div
            style="
              width: 200px;
              height: 25px;
              border: 1px solid grey;
              margin-left: 20px;
            "
          >
            <button style="margin-left: 10px">选择文件</button
            ><span>未选择文件</span>
          </div>
        </div>
        <div style="display: flex; margin-top: 50px; margin-left: 10px">
          <div
            style="
              width: 70px;
              height: 25px;
              border-radius: 5px;
              background-color: #078ff4;
              text-align: center;
              line-height: 25px;
              font-size: 12px;
              color: white;
              margin-left: 20px;
            "
          >
            确认导入
          </div>
          <div
            style="
              width: 180px;
              height: 25px;
              border-radius: 5px;
              background-color: #dcb73f;
              text-align: center;
              line-height: 25px;
              font-size: 12px;
              color: white;
              margin-left: 20px;
            "
          >
            下载Excel模板文件
          </div>
          <div
            style="
              width: 70px;
              height: 25px;
              border-radius: 5px;
              background-color: #eb0000;
              text-align: center;
              line-height: 25px;
              font-size: 12px;
              color: white;
              margin-left: 20px;
            "
          >
            取消
          </div>
        </div>
      </div>
      <!--此处可以换成子组件-->
    </div>
    <div v-show="menuIndex == 1">
      <div class="tool-box">
       
          <div class="daochu">
            <div class="daochu-topSize">
              <p style="padding-left: 20px">条件查询</p>
            </div>
            <div class="tool-inpBox">
              <div class="tool-inp">
                <el-input
                  style="width: 300px"
                  v-model="input"
                  placeholder="订单号"
                ></el-input>
                <el-input
                  style="width: 300px"
                  v-model="input"
                  placeholder="快递单号"
                ></el-input>
                <el-input
                  style="width: 360px"
                  v-model="input"
                  placeholder="用户手机号/姓名/名称,收件人姓名/手机号"
                ></el-input>
                <el-input
                  style="width: 300px"
                  v-model="input"
                  placeholder="支付方式"
                ></el-input>
              </div>
              <div class="tool-inpa">
                <el-select
                  v-model="value"
                  placeholder="订单状态"
                  style="width: 300px"
                >
                  <el-option
                    v-for="item in options"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  >
                  </el-option>
                </el-select>
                <el-input
                  style="width: 300px"
                  v-model="input"
                  placeholder="核销员名称/姓名/手机号"
                ></el-input>
                <el-select
                  v-model="value"
                  placeholder="核销门店"
                  style="width: 300px"
                >
                  <el-option
                    v-for="item in options"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  >
                  </el-option>
                </el-select>
              </div>
              <div class="tool-inpb">
                <el-select
                  v-model="value"
                  placeholder="订单状态"
                  style="width: 300px"
                >
                  <el-option
                    v-for="item in options"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  >
                  </el-option>
                </el-select>
                <el-input
                  style="width: 300px"
                  v-model="input"
                  placeholder="核销员名称/姓名/手机号"
                ></el-input>
              </div>
            </div>
            <div class="tool-tishi">
              <p>条件类型(可以多选导出所有类型的订单)</p>
            </div>
            <div class="tool-dingdan">
              <el-checkbox v-model="checked">快递订单</el-checkbox>
              <el-checkbox v-model="checked">自提订单</el-checkbox>
              <el-checkbox v-model="checked">核销订单</el-checkbox>
              <el-checkbox v-model="checked">虚拟物品订单</el-checkbox>
            </div>
            <div class="tool-paixu">
              <p style="font-size: 12px; width: 180px">现有列 (拖动可排序)</p>
              <el-select
                v-model="value"
                placeholder="订单状态"
                style="width: 300px; padding-left: 10px"
              >
                <el-option
                  v-for="item in options"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
              <p
                style="
                  width: 100px;
                  height: 30px;
                  background-color: #44abf7;
                  text-align: center;
                  color: white;
                  margin-left: 10px;
                  border-radius: 5px;
                  font-size: 12px;
                "
              >
                删除当前模板
              </p>
              <p
                style="
                  width: 100px;
                  height: 30px;
                  background-color: #44abf7;
                  text-align: center;
                  color: white;
                  margin-left: 10px;
                  border-radius: 5px;
                  font-size: 12px;
                "
              >
                保存当前模板
              </p>
              <p
                style="
                  width: 100px;
                  height: 30px;
                  background-color: red;
                  text-align: center;
                  color: white;
                  margin-left: 10px;
                  border-radius: 5px;
                  font-size: 12px;
                "
              >
                全部清空
              </p>
              <p
                style="
                  width: 100px;
                  height: 30px;
                  background-color: #44abf7;
                  text-align: center;
                  color: white;
                  margin-left: 10px;
                  border-radius: 5px;
                  font-size: 12px;
                "
              >
                默认模板
              </p>
            </div>
            <div class="tool-add">
              <div class="tool-add-context">
                <div
                  class="addSizeBox"
                  v-for="(item, index) in list"
                  @click="add(item, index)"
                  :key="index"
                >
                  <p>
                    <span>{{ item }}</span>
                  </p>
                </div>
              </div>
            </div>
            <el-button type="primary" style="margin-top: 30px;margin-left: 30px;">立即导出</el-button>
        </div>
        
      </div>
     
      <!--此处可以换成子组件-->
    </div>
   
  </div>
</template>

<script>
export default {
  data() {
    return {
      menuIndex: 0,
      navList: ["批量发货", "订单自定义导出"],
      value: "",
      checked: false,
      input: "",
      groups: [
        "订单编号",
        "会员id",
        "会员姓名",
        "自提门店",
        "收货姓名(或自提人)",
        "openid",
        "商品信息(信息分离)",
        "收货地址(省市区分离)",
      ],
      options: [
        {
          value: "选项1",
          label: "顺丰",
        },
        {
          value: "选项2",
          label: "圆通",
        },
        {
          value: "选项3",
          label: "中通",
        },
        {
          value: "选项4",
          label: "京东",
        },
        {
          value: "选项5",
          label: "韵达",
        },
      ],
      list: [
        "粉丝昵称",
        "会员等级",
        "会员手机号",
        "自提码",
        "联系电话",
        "收货地址(市区合并)",
        "支付方式",
        "配送方式",
        "商品小计",
        "运费",
        "积分抵扣",
        "余额抵扣",
        "满额立减",
        "优惠卷优惠",
        "粉丝昵称",
        "会员等级",
        "会员手机号",
        "自提码",
        "联系电话",
        "收货地址(市区合并)",
        "支付方式",
        "配送方式",
        "商品小计",
        "运费",
        "积分抵扣",
        "余额抵扣",
        "满额立减",
        "优惠卷优惠",
      ],
    };
  },
  methods: {
    menuShow(index) {
      this.menuIndex = index;
      console.log(this.menuIndex);
    },
  },
};
</script>

<style scoped lang="less">
li {
  list-style: none;
}
.btn {
  width: 145px;
}
.box1 {
  width: 580px;
  height: 400px;
  border: 1px solid grey;
  margin-left: 40px;
}
.box1 p {
  margin-left: 20px;
}

.tool-box {
  width: 94%;
  margin: 30px auto;
  .tool-context {
    width: 50%;
    height: 400px;
    padding-left: 50px;
    .tool-Size {
      width: 100%;
      height: 400px;
      border: 1px solid rgb(235, 235, 235);
      font-weight: bold;
      font-size: 15px;
    }
  }
}
.tool-bottom {
  width: 100%;
  .tool-xuanze {
    width: 30%;
    padding-top: 30px;
    display: flex;
    align-items: center;
    justify-content: space-around;
  }
}
.tool-bottomBut {
  width: 30%;
  display: flex;
  justify-content: space-around;
  padding-top: 20px;
}
.daochu {
  width: 99%;
  height: 700px;
  border: 1px solid rgb(235, 235, 235);
  .daochu-topSize {
    width: 100%;
    height: 50px;
    border: 1px solid rgb(235, 235, 235);
    line-height: 50px;
    font-weight: bold;
  }
  .tool-inpBox {
    width: 100%;
    height: 200px;
    border: 1px solid rgb(235, 235, 235);
    .tool-inp {
      width: 98%;
      height: 50px;
      display: flex;
      justify-content: space-between;
      margin: 0px auto;
      padding-top: 5px;
    }
    .tool-inpa {
      width: 60%;
      height: 50px;
      display: flex;
      justify-content: space-between;
      padding-top: 5px;
      padding-left: 15px;
    }
    .tool-inpb {
      width: 39.5%;
      height: 50px;
      display: flex;
      justify-content: space-between;
      padding-top: 5px;
      padding-left: 15px;
    }
  }
  .tool-tishi {
    width: 100%;
    height: 30px;
    border-bottom: 1px solid rgb(235, 235, 235);
    font-size: 15px;
    line-height: 30px;
    padding-left: 20px;
  }
  .tool-dingdan {
    width: 100%;
    height: 60px;
    display: flex;
    align-items: center;
    padding-left: 20px;
    border: 1px solid rgb(235, 235, 235);
  }
  .tool-paixu {
    width: 60%;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 20px;
    border-bottom: 1px solid rgb(235, 235, 235);
    line-height: 30px;
  }
  .toll-tuodong {
    width: 100%;
    height: 100px;
    border-bottom: 1px solid rgb(235, 235, 235);
    .paixubox {
      height: 100px;
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      .paixuSize {
        width: 90%;
        height: 40px;
        margin-left: 20px;
        text-align: center;
        line-height: 40px;
        border: 1px solid rgb(235, 235, 235);
        color: rgb(178, 175, 175);
        position: relative;
      }
      .tool-shanchu {
        position: absolute;
        right: 0px;
        bottom: 23px;
      }
    }
  }
  .tool-add {
    width: 100%;
    height: 200px;
    .tool-add-context {
      width: 98%;
      height: 200px;
      margin: 0px auto;
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
      .addSizeBox {
        min-width: 8%;
        height: 40px;
        padding-right: 20px;
        padding-left: 20px;
        text-align: center;
        line-height: 40px;
        border: 1px solid #ebebeb;
        color: #686868;
        border-radius: 5px;
      }
    }
  }
}
</style>
